<?php

namespace App\Controller;

use App\JsonRpc\Interfaces\CalculateServiceInterface;
use Hyperf\HttpServer\Contract\RequestInterface;

class CalculateController extends AbstractController
{
    public function add(CalculateServiceInterface $service,RequestInterface $request)
    {
        return $service->add(
            $request->query("a",10),
            $request->query("b",5)
        );
    }
}